package org.jactao.v_1_0_test.service;

import org.jactao.v_1_0_test.service.dto.UserDto;

import java.util.UUID;

/**
 * Created by fanzetao on 2018/4/4.
 */
public class UserServiceImpl implements UserService {

    @Override
    public UserDto register(String userName, String password) {
        System.out.println("register user " + userName);
        UserDto userDto = new UserDto();
        userDto.setId(UUID.randomUUID().toString());
        userDto.setUserName(userName);
        userDto.setPassword(password);

        /*int i = 0;
        if(i == 0) {
            throw new NumberFormatException("exception serializer test ");
        }*/

        return userDto;
    }
}
